package com.wx.wrapper;

/**
 * @Author : 佩萁
 * Description :
 * @Create : 2023/7/11 - 10:23
 */
public class StringMethod01 {
    public static void main(String[] args) {
        String str1 = "hello";
        String str2 = "Hello";
        System.out.println(str1.equals(str2));//比较内容是否相同，区分带小写

        System.out.println(str1.equalsIgnoreCase(str2));//忽略大小写

        System.out.println(str1.length());//获取字符个数，字符串长度

        System.out.println(str1.indexOf('o'));

        System.out.println(str1.lastIndexOf('l'));

        System.out.println(str1.substring(1));
    }
}
